package encapsulation;

/**
 * @classname:SalaryCalc
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/27 22:18
 * @version: 0.1
 * @since:1.8
 */
public class SalaryCalc {

    public SalaryCalc() {
    }

    public double pay(PM pm) {
        return pm.getSalary() + pm.getBonus();
    }

    public double pay(SE se) {
        return se.getSalary();
    }
}
